Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

svgfont2svgicons

Package Overview
Dependencies
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

svgfont2svgicons

Extract SVG icons from an SVG font

  • 2.0.0
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

svgfont2svgicons

svgfont2svgicons is a simple tool to explode a SVG font into multiple icons.

NPM version Build status Dependency Status devDependency Status Coverage Status Code Climate

## Usage

In your scripts

var svgfont2svgicons = require('svgfont2svgicons');
var fs = require('fs');
var fontStream = fs.createReadStream('myFont.svg');
var iconProvider = svgfont2svgicons(options);

// Piping the font
fontStream.pipe(iconProvider);

// Saving the SVG files
iconProvider.on('readable', function() {
  var icon;
  do {
    icon = iconProvider.read();
    if(icon) {
      console.log('New icon:', icon.metadata.name, icon.metadata.unicode);
      icon.pipe(fs.createWriteStream(icon.metadata.name + '.svg'));
    }
  } while(null !== icon);
}).once('end', function() {
  console.log('No more icons !')
});

## CLI interface

svgfont2svgicons font/src/file.svg icons/dest/directory

Options

Currently no options, feel free to suggest some in the issues.

Stats

NPM NPM

Contributing

Feel free to pull your code if you agree with publishing under the MIT license.

Keywords

FAQs

Package last updated on 14 Jun 2015

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc